<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<title>个人资料</title>
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="format-detection" content="telephone=no">
	<link rel="stylesheet" href="${s.base}/js/layui/css/layui.css" media="all" />
	<link rel="stylesheet" href="${s.base}/css/base/base.css" media="all" />
</head>
<body class="childrenBody">
<form class="layui-form layui-row">
	<div class="layui-col-md12 layui-col-xs12">
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">网站名称</label>
			<div class="layui-input-block">
				<input type="hidden"  class="layui-input" id="id" name="id" value="${webConfig.id}">
				<input type="text"  class="layui-input" id="name" name="name" value="${webConfig.name}">
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">网站关键字</label>
			<div class="layui-input-block">
				<input type="text"  class="layui-input" id="keyword" name="keyword" value="${webConfig.keyword}">
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">logo图片</label>
			<div class="layui-input-block">
				<div class="famous-upload-pic">
					<img  <#if webConfig.logo?if_exists  >src="${webConfig.logo}"<#else>src="${s.base}/image/icon_addpic.png"</#if> class="upload-avatar" id="upload-avatar"/>
					<input type="file" name="myfiles" class="upload" id="myFile" onchange="ajaxFileUploads('myFile','logo','upload-avatar')">
					<input type="hidden" class="image" name="logo" id="logo" <#if webConfig.logo?if_exists  > value="${webConfig.logo}"  <#else> value="/image/icon_addpic.png" </#if> />
				</div>
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">QQ</label>
			<div class="layui-input-block">
				<input type="text"  class="layui-input" id="qq" name="qq" value="${webConfig.qq}">
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">联系电话</label>
			<div class="layui-input-block">
				<input type="text"  class="layui-input" id="linkPhone" name="linkPhone" value="${webConfig.linkPhone}" >
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">工作电话</label>
			<div class="layui-input-block">
				<input type="text"  class="layui-input" id="workPhone" name="workPhone" value="${webConfig.workPhone}" >
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">微信二维码</label>
			<div class="layui-input-block">
				<div class="layui-input-block">
					<div class="famous-upload-pic">
						<img  <#if webConfig.wechat?if_exists  >src="${webConfig.wechat}"<#else>src="${s.base}/image/icon_addpic.png"</#if> class="upload-avatar" id="upload-avatar-wechat"/>
						<input type="file" name="myfiles" class="upload" id="wechatMyFile" onchange="ajaxFileUploads('wechatMyFile','wechat','upload-avatar-wechat')">
						<input type="hidden" class="image" name="wechat" id="wechat" <#if webConfig.wechat?if_exists  > value="${webConfig.wechat}"  <#else> value="/image/icon_addpic.png" </#if> />
					</div>
				</div>
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">联系邮箱</label>
			<div class="layui-input-block">
				<input type="text"  class="layui-input" id="eamil" name="eamil" value="${webConfig.eamil}" >
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">联系地址</label>
			<div class="layui-input-block">
				<input type="text"  class="layui-input" id="address" name="address" value="${webConfig.address}" >
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">付费二维码</label>
			<div class="layui-input-block">
				<div class="layui-input-block">
					<div class="famous-upload-pic">
						<img  <#if webConfig.payPic?if_exists  >src="${webConfig.payPic}"<#else>src="${s.base}/image/icon_addpic.png"</#if> class="upload-avatar" id="upload-avatar-payPic"/>
						<input type="file" name="myfiles" class="upload" id="payPicMyFile" onchange="ajaxFileUploads('payPicMyFile','payPic','upload-avatar-payPic')">
						<input type="hidden" class="image" name="payPic" id="payPic" <#if webConfig.payPic?if_exists  > value="${webConfig.payPic}"  <#else> value="/image/icon_addpic.png" </#if> />
					</div>
				</div>
			</div>
		</div>
		<div class="layui-form-item layui-row layui-col-xs12">
			<label class="layui-form-label">底部图片</label>
			<div class="layui-input-block">
				<div class="layui-input-block">
					<div class="famous-upload-pic">
						<img  <#if webConfig.bottomPic?if_exists  >src="${webConfig.bottomPic}"<#else>src="${s.base}/image/icon_addpic.png"</#if> class="upload-avatar" id="upload-avatar-bottomPic"/>
						<input type="file" name="myfiles" class="upload" id="bottomPicMyFile" onchange="ajaxFileUploads('bottomPicMyFile','bottomPic','upload-avatar-bottomPic')">
						<input type="hidden" class="image" name="bottomPic" id="bottomPic" <#if webConfig.bottomPic?if_exists  > value="${webConfig.bottomPic}"  <#else> value="/image/icon_addpic.png" </#if> />
					</div>
				</div>
			</div>
		</div>
		<div class="layui-form-item">
			<div class="layui-input-block">
				<button class="layui-btn" lay-submit="" lay-filter="btnSubmit">立即提交</button>
				<button type="reset" class="layui-btn layui-btn-primary">重置</button>
			</div>
		</div>
	</div>
</form>
<script type="text/javascript" src="${s.base}/js/layui/layui.js"></script>
<script type="text/javascript" src="${s.base}/js/base/jquery-3.2.0.min.js"></script>
<script type="text/javascript" src="${s.base}/js/base/ajaxfileupload.js"></script>
<script type="text/javascript">
    layui.use(['form','layer'],function(){
        var form = layui.form
        layer = parent.layer === undefined ? layui.layer : top.layer,
            $ = layui.jquery;
        form.on("submit(btnSubmit)",function(data){
            //弹出loading
            var index = top.layer.msg('数据提交中，请稍候',{icon: 16,time:false,shade:0.8});
            // 实际使用时的提交信息
            $.post("/webConfig/updateOrAddEntity",data.field,function(result){
                if(1==result.returnInfo.state){
                    top.layer.close(index);
                    top.layer.msg("操作成功！");
                    layer.closeAll("iframe");
                    //刷新父页面
                    location.reload();
                }else{
                    top.layer.msg(result.returnInfo.errorMsg);
                }
            },"json")
            return false;
        });
    })
</script>

</body>
</html>